package Ex1;

import java.util.Scanner;

public class Ex5 {
    public static void main(String[]args){
        Scanner sc =new Scanner(System.in);
        System.out.println("请输入前几位");
        String inputValue = sc.next();
        int oddSum = 0;
        for(int i=0;i < inputValue.length();i += 2){
            int odd = inputValue.charAt(i) - '0';
            oddSum += odd;
        }
        System.out.println(oddSum);
        int evenSum = 0;
        for(int i =1;i < inputValue.length();i +=2){
            int even = inputValue.charAt(i) - '0';
            evenSum += even;
        }
        System.out.println(evenSum);
        int a = oddSum + evenSum * 3;
        int b = (a % 10);
        int c = (10 - b % 10);
        System.out.println(inputValue + c);

    }
}
